import ajax from "@/utils/request";
import '../mock/login/loginMock'

export function registerFn(data) {
    return ajax({
        url: '/login/register',
        method: 'post',
        data
    })
}

export function getCodeFn() {
    return ajax({
        url: '/login/getCode',
        method: 'post',
    })
}

export function loginFn(data) {
    return ajax({
        url: '/login/login',
        method: 'post',
        data,
    })
}

export function checkCodeFn(data) {
    return ajax({
        url: '/login/checkCode',
        method: 'post',
        data,
    })
}

export function setNewPasswordFn(data) {
    return ajax({
        url: '/login/setNewPassword',
        method: 'post',
        data,
    })
}